package ${basePackage}.web.api.impl.rest.${moduleName}.assembler;

import org.springframework.stereotype.Component;
import java.util.Date;

/**
* 将command转换为${className}
* Date:${.now}
* @author
*/
@Component
public class ${className}Assembler extends SuperAssembler{

    /**
    * 将${className}CreateCommand转换为${className}
    * TODO 补充调整代码
    *
    * @param command
    * @return
    */
//  public ${className} to${className}(${className}CreateCommand command){
//      Date currentDate = generateCurrentDate();
//      ${className} entity = new ${className}();
//      String uuid = generateUUID();
//      <#list fields as field>
//      /** ${field.remarks} */
//      entity.set${field.fieldNameUP}(command.get${field.fieldNameUP}());
//      </#list>
//      /** 创建时间 */
//      entity.setCreateDate(currentDate);
//      /** 更新时间 */
//      entity.setUpdateDate(currentDate);
//      return entity;
//  }

    /**
    * 将${className}UpdateCommand${className}转换为${className}
    * TODO 补充调整代码
    *
    * @param command
    * @return
    */
//  public ${className} to${className}(${className}UpdateCommand command){
//      Date currentDate = generateCurrentDate();
//      ${className} entity = new ${className}();
//      <#list fields as field>
//      /** ${field.remarks} */
//      entity.set${field.fieldNameUP}(command.get${field.fieldNameUP}());
//      </#list>
//      entity.setUpdateDate(currentDate);
//      return entity;
//  }

    /**
    * 将${className}PageCommand${className}转换为${className}
    * TODO 补充调整代码
    *
    * @param command
    * @return
    */
//  public ${className} to${className}(${className}PageCommand command){
//      ${className} entity = new ${className}();
//      <#list fields as field>
//      /** ${field.remarks} */
//      entity.set${field.fieldNameUP}(command.get${field.fieldNameUP}());
//      </#list>
//      return entity;
//  }

}